As is known, a computer stores information on external media such as hard disks and tape drives. During the computer's execution of a program, the information is retrieved from a disk and/or tape drive and is copied into the computer's RAM. Normally, a program will access a file located on a disk, allocate RAM for the file and then read data from the file on disk into RAM. When information is loaded into RAM, it is normally loaded in sequential address order so that, during execution, a program can sequence addresses and accomplish execution of a procedure. By contrast, information stored on a disk is often broken into segments and stored anywhere on the disk, not necessarily in sequential address order. To enable accessing of information stored on a disk, a directory file is maintained on the disk that provides a directory to disk address locations for the program segments that are stored therein. When a series of files are then to be loaded into RAM from a disk, the operating system accesses the directory file, finds the disk addresses of the required program segments and then accesses the segments from the disk, and loads them into RAM in the sequential order that they will be required during procedure execution.
Rather than employing actual disk drives to store information, some computers employ a "RAM disk" or, as it is sometimes otherwise known, a "virtual disk". In essence, a RAM disk is an area of RAM that is allocated by the computer's operating system and is employed as though it were an actual hard disk i.e., program segments are stored in various locations therein and a directory is maintained of where the various program segments can be found. Ordinarily, there is no attempt made to maintain any particular sequence of addresses of programs stored in a RAM disk.
Operating systems generally treat data accessed from a RAM disk exactly as it is treated when it is accessed from a hard disk. For instance, when information is accessed from either a RAM disk or a hard disk, it is inserted into an area of RAM allocated for use as a procedure execution space and is positioned so that address values of program segments are in sequential order. Thus, when the operating system causes information in the procedure execution space to be accessed, it is executed in the sequential address order that it is stored.
Because, as aforesaid, a RAM disk is treated exactly as a hard disk by an operating system, information from one part of RAM is duplicated and stored in another part of RAM in preparing to execute a procedure. As a result, two identical copies of program segments appear in RAM, one organized as data would be organized in a disk file (not necessarily sequential) and one organized in a procedure execution space, i.e., in sequential address locations. As a result, considerable RAM space becomes unavailable due to this duplication of data.
Accordingly, it is an object of this invention to provide a procedure which enables more efficient use of a computer's RAM space when that computer employs a RAM disk.
It is another object of this invention to provide a method for preventing duplication of information in a RAM when a RAM disk is being utilized.